﻿using System;
using System.Collections.Generic;

namespace EntityFrameworkExtension.Interface
{
    public interface IDataCache
    {
        List<T> GetTypeMapping<T>(IEfContext efContext) where T : class, IEquatable<T>;
        List<T> GetTypeMappingWithRefresh<T>(IEfContext efContext) where T : class, IEquatable<T>;

        TU GetId<T, TU>(string name, IEfContext iefContext)
            where T : class, IReferenceTypeMapping<TU>, IEquatable<T>
            where TU : struct;
        T GetObject<T, TU>(string name, IEfContext iefContext)
            where T : class, IReferenceTypeMapping<TU>, IEquatable<T>
            where TU : struct;
    }
}
